teach lowranceusr about track segments (#1306)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Sat, 27 Jul 2024 18:02:57 +0000 (12:02 -0600)
committerGitHub <noreply@github.com>
Sat, 27 Jul 2024 18:02:57 +0000 (12:02 -0600)
commitb1d2df5c9ccadb058d6edb9310329396d90c6315
tree36923cab0ee0cfa968ebec72178ea682b24504d7
parentc86aff1d7068edf9a987860d88ebe02a56674157
teach lowranceusr about track segments (#1306)

* teach lowranceusr about track segments.

lowranceusr versions 2 & 3 have a continuous flag used to
indicate dicontinuities in a trail.
The lowranceusr version 2 & 3 reader now flags trail discontinuities
as new track segements.
The lowranceusr version 2 & 3 writer now flags new track segments as
discontinuities.

Also fix two subtle bugs:
1) when reading a version 2 or 3 trail with the break option we would
fail to break the trail if the discontinuity was at the start of a
section other than the first section.
2) when writing a version 2 or 3 trail with the merge option if the
number of points exceeded MAX_TRAIL_POINTS we would write a header
that indicated MAX_TRAIL_POINTS but actually write MAX_TRAIL_POINTS + 1.

* add lowranceusr test for track segments.
lowranceusr.cc
lowranceusr.h
reference/lowrance-v2-merge~usr.gpx [new file with mode: 0644]
reference/lowrance-v2.gpx [new file with mode: 0644]
testo.d/lowranceusr.test